<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/11/24
  Time: 0:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>联系我们</title>
    <link rel="stylesheet" href="../../css/index/foot.css">
    <link rel="stylesheet" href="../../css/index/common.css">
    <link rel="stylesheet" href="../../css/index/call.css">
    <script src="../js/jquery-3.5.1.js"></script>


</head>
<body>
<!--人力资源静态页面-->
<jsp:include page="top.jsp"></jsp:include>

<div class="middle" style="">
    <div id="container"></div>
    <div>
        <div>
            <c:forEach items="${companyModelList}" var="value" begin="0" end="0">
                <div><img src="${value.addressImg}"/></div>
                <div>${value.address}</div>
            </c:forEach>

        </div>
        <div>
            <c:forEach items="${companyModelList}" var="value" begin="0" end="0">
                <div><img src="${value.phoneImg}"/></div>
                <div>${value.online}</div>
                <div>${value.consultingCenter}</div>
                <div>${value.phone}</div>
            </c:forEach>

        </div>
        <div>
            <c:forEach items="${companyModelList}" var="value" begin="0" end="0">
                <div><img src="${value.emailImg}"/></div>
                <div>${value.email}</div>
            </c:forEach>

        </div>
    </div>
</div>
<jsp:include page="foot.jsp"></jsp:include>
</body>
</html>
<script>
    function loadJScript() {
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = '//api.map.baidu.com/api?type=webgl&v=1.0&ak=PYbsLVtUVgNbNITT4nWT71YhcwAnoly2&callback=init';
        document.body.appendChild(script);
    }
    function init() {
        var map = new BMapGL.Map('container'); // 创建Map实例
        var point = new BMapGL.Point(104.04, 30.64); // 创建点坐标
        map.centerAndZoom(point, 14);
        map.enableScrollWheelZoom(); // 启用滚轮放大缩小
    }
    window.onload = loadJScript; // 异步加载地图
</script>
<script type="text/javascript">
    // 百度地图API功能
    var map = new BMapGL.Map("container");
    var point = new BMapGL.Point(104.04, 30.64);
    map.centerAndZoom(point, 15);

    var marker = new BMapGL.Marker(point);  // 创建标注
    map.addOverlay(marker);              // 将标注添加到地图中
    var opts = {
        width : 200,     // 信息窗口宽度
        height: 100,     // 信息窗口高度
        title : "锦江宾馆" , // 信息窗口标题
        message:"这里是锦江宾馆"
    }
    var infoWindow = new BMapGL.InfoWindow("地址：四川锦江宾馆", opts);  // 创建信息窗口对象
    marker.addEventListener("click", function(){
        map.openInfoWindow(infoWindow, point); //开启信息窗口
    });
</script>
